package com.dev118.jexample.mongodb.dao;

import java.util.List;
import java.util.Map;

import com.mongodb.DBObject;

/**
 * ClassName: GenericMongoDao <br/>
 * 全局公共MongoDB操作Dao，被所有的MongoDB操作的Dao所继承 <br/>
 * date: 2014年6月20日 上午10:04:06 <br/>
 * 
 * @version
 * @since JDK 1.6
 */
public interface GenericDAO {

	int save(DBObject dbObj);

	int save(List<DBObject> listDBObj);

	int remove(DBObject dbObjParams);

	int update(DBObject dbObjParams, DBObject newDBObjData);

	DBObject findOne(DBObject dbObjParams);

	DBObject findOne(DBObject dbObjFlds, DBObject dbObjParams);

	List<DBObject> finds(DBObject dbObjParams, DBObject dbObjSort);

	List<DBObject> finds(DBObject dbObjFlds, DBObject dbObjParams,
			DBObject dbObjSort);

	Long count(DBObject dbObjParams);

	Map<String, Object> page(DBObject dbObjFlds, DBObject dbObjParams,
			DBObject dbObjSort, Integer offset, Integer pageSize);

}
